﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace ERPU8WebApi.Models.Sys
{
    //编码规则
    public class GradeDef
    {
        //最大级数 
        public int lgrade;
        //最长编码 
        public int lgradeLen;
        //编码表名
        public string keyWord;
        //当前编码规则 
        public string coningRule;
    }
    public class GradeDefController
    {
        //创建一个编码规则对象
        public GradeDef GetGradeDef(DataTable dt)
        {
            GradeDef g = new GradeDef();
            g.lgrade = int.Parse(dt.Rows[0]["LGRADE"].ToString());
            g.lgradeLen = int.Parse(dt.Rows[0]["LGRADELEN"].ToString());
            g.keyWord = dt.Rows[0]["KEYWORD"].ToString();
            g.coningRule = dt.Rows[0]["CODINGRULE"].ToString();
            return g;
        }
    }
}